{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "81ba381d-e725-4b1a-a1f7-e1d17c864def",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    1     1     2     3     5     8    13    21    34    55 \n",
      "\n",
      "   89   144   233   377   610   987  1597  2584  4181  6765 \n",
      "\n"
     ]
    }
   ],
   "source": [
    "def fab(n):\n",
    "    if n <= 2: return(1)\n",
    "    else:\n",
    "        return(fab(n-1)+fab(n-2))\n",
    "n=20\n",
    "for i in range(1,n+1):\n",
    "    print(format(fab(i),\">5\"),end=' ')\n",
    "    if(i % 10==0):print(\"\\n\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e46ab7a5-660d-4c29-b32d-75855af78adc",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
